package cn.mg.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;

import cn.mg.pojo.invitation;
import cn.mg.service.*;


@Controller
@RequestMapping("/invitation")
public class invitationController {
	private Logger logger = Logger.getLogger(invitationController.class);
	
	@Autowired
	private invitationService invitationService;
	
	@RequestMapping("/list")
	@ResponseBody
	public String getinvitationList(String invitationName){
		List<invitation> invitationList = invitationService.getInvitationInfoByName(invitationName);
		String JSONStr = JSON.toJSONString(invitationList);
		return JSONStr;
	}
}
